package com.qk.management.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class MyAspect {

    @Pointcut("@annotation(com.qk.management.aop.anno.MyAnno)")
    public void pt(){

    }

    @Around("pt()")
    public Object around(ProceedingJoinPoint pjp) throws Throwable {
        System.out.println("--------------------------环绕通知开始-----------------------------");
        Object obj = pjp.proceed();
        System.out.println("--------------------------环绕通知结束-----------------------------");
        return obj;
    }
}
